package org.p2psimulator.entity.protocol.messages.general;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.Message;
import org.p2psimulator.entity.behavior.BehaviorTypes;
import org.p2psimulator.entity.id.DoubleId;
import org.p2psimulator.entity.protocol.messages.MessageTypes;

@SuppressWarnings ("unchecked")
public class DownloadAnswerMessage extends Message{

	public DownloadAnswerMessage(Id origin, Id destination, int transactionId,
			BehaviorTypes originBehavior) {
		super(origin, destination, transactionId, originBehavior);
	}
	DoubleId file;

	boolean corrupted;

	boolean neutro = false;

	public boolean isNeutro() {
		return neutro;
	}

	public void setNeutro(boolean neutro) {
		this.neutro = neutro;
	}

	public DoubleId getFile() {
		return file;
	}

	public void setFile(DoubleId file) {
		this.file = file;
	}

	public boolean isCorrupted() {
		return corrupted;
	}

	public void setCorrupted(boolean corrupted) {
		this.corrupted = corrupted;
	}



	@Override
	public String getName() {

		return MessageTypes.DOWNLOAD_ANSWARE_MESSAGE.getName();
	}
	@Override
	public MessageTypes getMessageType() {

		return MessageTypes.DOWNLOAD_ANSWARE_MESSAGE;
	}

}
